package com.example.chat.model;

import com.example.chat.constant.StaticConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author pq
 * @date 2022/8/17 13:08
 * @description 角色基础数据表
 * @modified
 **/
@Data
@Entity
@DynamicUpdate
@DynamicInsert
@Table(name = "role_info")
public class RoleInfo extends BaseEntity implements Serializable {
    /**
     * 主键
     */
    @Id
    @GenericGenerator(name="uuid",strategy = "org.hibernate.id.UUIDGenerator")
    @GeneratedValue(generator = "uuid")
    private String id;

    /**
     * 角色代码
     */
    @Column(name = "number",nullable = false)
    private String number;

    /**
     * 角色名称
     */
    @Column(name = "name",nullable = false)
    private String name;

    /**
     * 角色描述
     */
    @Column(name = "description")
    private String description;
}
